import { request } from "vendor/utils/T";
import {RespDataType } from "./apiType";
import { toApi } from "@/service/proxyApi";

export * from "./apiType";

const {get, del} = request;

/**
 * 获取分页列表
 */
export const getOnlineUserPageList = (params: {page:number, pageSize: number, ip?: string, userName?: string, dateRange?: string,}) => {
    return get<RespDataType.OnlineUserPageList>(toApi("api/v1/system/online/list"), params);
}

/**
 * 强制退出
 */
export const deleteOnlineUser = (idList:number[]) => {
    return del(toApi(`api/v1/system/online/forceLogout?ids=${JSON.stringify(idList)}`));
}
